Optimal. Leaf size=457 \[ -\frac {8 e^2 (e f-3 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g^2}+\frac {2 e^2 (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c g}+\frac {2 \sqrt {-a} e \left (9 a e^2 g^2-c \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^3 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {2 \sqrt {-a} \left (a e^2 g^2 (7 e f-15 d g)-c \left (8 e^3 f^3-30 d e^2 f^2 g+45 d^2 e f g^2-15 d^3 g^3\right )\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} F\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^3 \sqrt {f+g x} \sqrt {a+c x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 457, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {945, 1668, 858,
733, 435, 430} \begin {gather*} \frac {2 \sqrt {-a} e \sqrt {\frac {c x^2}{a}+1} \sqrt {f+g x} \left (9 a e^2 g^2-c \left (45 d^2 g^2-30 d e f g+8 e^2 f^2\right )\right ) E\left (\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^3 \sqrt {a+c x^2} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}}}-\frac {2 \sqrt {-a} \sqrt {\frac {c x^2}{a}+1} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}} \left (a e^2 g^2 (7 e f-15 d g)-c \left (-15 d^3 g^3+45 d^2 e f g^2-30 d e^2 f^2 g+8 e^3 f^3\right )\right ) F\left (\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^3 \sqrt {a+c x^2} \sqrt {f+g x}}-\frac {8 e^2 \sqrt {a+c x^2} \sqrt {f+g x} (e f-3 d g)}{15 c g^2}+\frac {2 e^2 \sqrt {a+c x^2} (d+e x) \sqrt {f+g x}}{5 c g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 430
Rule 435
Rule 733
Rule 858
Rule 945
Rule 1668
Rubi steps
\begin {align*} \int \frac {(d+e x)^3}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx &=\frac {2 e^2 (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c g}-\frac {\int \frac {-5 c d^3 g+a e^2 (2 e f+d g)+e \left (3 a e^2 g+c d (2 e f-15 d g)\right ) x+4 c e^2 (e f-3 d g) x^2}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{5 c g}\\ &=-\frac {8 e^2 (e f-3 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g^2}+\frac {2 e^2 (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c g}-\frac {2 \int \frac {-\frac {1}{2} c g^2 \left (15 c d^3 g-a e^2 (2 e f+15 d g)\right )+\frac {1}{2} c e g \left (9 a e^2 g^2-c \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right )\right ) x}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{15 c^2 g^3}\\ &=-\frac {8 e^2 (e f-3 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g^2}+\frac {2 e^2 (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c g}-\frac {\left (e \left (9 a e^2 g^2-c \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right )\right )\right ) \int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx}{15 c g^3}+\frac {\left (a e^2 g^2 (7 e f-15 d g)-c \left (8 e^3 f^3-30 d e^2 f^2 g+45 d^2 e f g^2-15 d^3 g^3\right )\right ) \int \frac {1}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{15 c g^3}\\ &=-\frac {8 e^2 (e f-3 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g^2}+\frac {2 e^2 (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c g}-\frac {\left (2 a e \left (9 a e^2 g^2-c \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{15 \sqrt {-a} c^{3/2} g^3 \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {a+c x^2}}+\frac {\left (2 a \left (a e^2 g^2 (7 e f-15 d g)-c \left (8 e^3 f^3-30 d e^2 f^2 g+45 d^2 e f g^2-15 d^3 g^3\right )\right ) \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{15 \sqrt {-a} c^{3/2} g^3 \sqrt {f+g x} \sqrt {a+c x^2}}\\ &=-\frac {8 e^2 (e f-3 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g^2}+\frac {2 e^2 (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c g}+\frac {2 \sqrt {-a} e \left (9 a e^2 g^2-c \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^3 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {2 \sqrt {-a} \left (a e^2 g^2 (7 e f-15 d g)-c \left (8 e^3 f^3-30 d e^2 f^2 g+45 d^2 e f g^2-15 d^3 g^3\right )\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} F\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^3 \sqrt {f+g x} \sqrt {a+c x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 22.85, size = 625, normalized size = 1.37 \begin {gather*} \frac {2 \sqrt {f+g x} \left (c e^2 g^2 (-4 e f+15 d g+3 e g x) \left (a+c x^2\right )+\frac {e g^2 \left (-9 a^2 e^2 g^2+c^2 \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right ) x^2+a c \left (-30 d e f g+45 d^2 g^2+e^2 \left (8 f^2-9 g^2 x^2\right )\right )\right )}{f+g x}+i c e \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}} \left (-9 a e^2 g^2+c \left (8 e^2 f^2-30 d e f g+45 d^2 g^2\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} \sqrt {f+g x} E\left (i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )+\frac {\sqrt {c} g \left (15 i c^{3/2} d^3 g^2+9 a^{3/2} e^3 g^2-i a \sqrt {c} e^2 g (2 e f+15 d g)+\sqrt {a} c e \left (-8 e^2 f^2+30 d e f g-45 d^2 g^2\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} \sqrt {f+g x} F\left (i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )}{\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}\right )}{15 c^2 g^4 \sqrt {a+c x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2948\) vs.
\(2(385)=770\).
time = 0.10, size = 2949, normalized size = 6.45
method | result | size |
elliptic | \(\frac {\sqrt {\left (g x +f \right ) \left (c \,x^{2}+a \right )}\, \left (\frac {2 e^{3} x \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{5 c g}+\frac {2 \left (3 d \,e^{2}-\frac {4 f \,e^{3}}{5 g}\right ) \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{3 c g}+\frac {2 \left (d^{3}-\frac {2 f a \,e^{3}}{5 c g}-\frac {a \left (3 d \,e^{2}-\frac {4 f \,e^{3}}{5 g}\right )}{3 c}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {2 \left (3 d^{2} e -\frac {3 a \,e^{3}}{5 c}-\frac {2 f \left (3 d \,e^{2}-\frac {4 f \,e^{3}}{5 g}\right )}{3 g}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \left (\left (-\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \EllipticE \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )+\frac {\sqrt {-a c}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{c}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}\right )}{\sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}\) | \(711\) |
risch | \(\frac {2 e^{2} \left (3 e g x +15 d g -4 e f \right ) \sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}{15 c \,g^{2}}-\frac {\left (\frac {2 \left (9 a \,e^{3} g^{2}-45 c \,d^{2} e \,g^{2}+30 c d \,e^{2} f g -8 c \,e^{3} f^{2}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \left (\left (-\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \EllipticE \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )+\frac {\sqrt {-a c}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{c}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {30 a d \,e^{2} g^{2} \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {4 a \,e^{3} f g \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}-\frac {30 d^{3} c \,g^{2} \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}\right ) \sqrt {\left (g x +f \right ) \left (c \,x^{2}+a \right )}}{15 c \,g^{2} \sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}\) | \(1082\) |
default | \(\text {Expression too large to display}\) | \(2949\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.53, size = 315, normalized size = 0.69 \begin {gather*} \frac {2 \, {\left ({\left (45 \, c d^{3} g^{3} - 45 \, c d^{2} f g^{2} e - {\left (8 \, c f^{3} - 3 \, a f g^{2}\right )} e^{3} + 15 \, {\left (2 \, c d f^{2} g - 3 \, a d g^{3}\right )} e^{2}\right )} \sqrt {c g} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right ) - 3 \, {\left (45 \, c d^{2} g^{3} e - 30 \, c d f g^{2} e^{2} + {\left (8 \, c f^{2} g - 9 \, a g^{3}\right )} e^{3}\right )} \sqrt {c g} {\rm weierstrassZeta}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right )\right ) + 3 \, {\left (15 \, c d g^{3} e^{2} + {\left (3 \, c g^{3} x - 4 \, c f g^{2}\right )} e^{3}\right )} \sqrt {c x^{2} + a} \sqrt {g x + f}\right )}}{45 \, c^{2} g^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e x\right )^{3}}{\sqrt {a + c x^{2}} \sqrt {f + g x}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (d+e\,x\right )}^3}{\sqrt {f+g\,x}\,\sqrt {c\,x^2+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________